/*
 对element-ui进行一些重置和改造的样式文件
*/
@import './typography.less';

.el-input__suffix {
  display: flex;
  justify-content: center;
  align-items: center;
}

.input-with-select {
  .el-input__icon {
    &::before {
      content: "\e60c"!important;
    }
  }
}

.el-select .el-input__suffix-inner,
.el-cascader .el-input__suffix-inner {
  transform: scale(0.8)!important;
  .el-input__icon:not(.el-icon-circle-close) {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.4)!important;
    &::before {
      content: "\e60c";
    }
  }
}
.el-select .el-input__suffix-inner .el-input__icon:not(.el-icon-circle-close) {
  &::before {
    content: "\e60c";
  }
}
.el-cascader .el-input__suffix-inner .el-input__icon:not(.el-icon-circle-close) {
  &::before {
    content: "\e60b";
  }
}



.el-input-number .el-input__inner {
  text-align: left;
}



.el-cascader {
  line-height: 1;
  .el-scrollbar__wrap {
    overflow-x: hidden;
  }
}
.el-cascader .el-input .el-input__inner:focus,
.el-cascader .el-input.is-focus .el-input__inner,
.el-input-group--prepend .el-select .el-input.is-focus .el-input__inner {
  border-color: @link!important;
}


.el-input--nt-normal {

  .el-input__inner {
    height: 32px;
    line-height: 32px;
  }
}


.el-select, .el-cascader, .el-input-number {
  width: 100%;
}


.el-input-number {
  .el-input-number__decrease,
  .el-input-number__increase {
    width: 21px;
    height: 50%!important;
    display: flex;
    align-items: center;
    justify-content: center;
    // box-shadow: 1px 0px 0px 0px #D9D9D9, 0px 0px 0px 0px #D9D9D9;
    border-radius: 0px 2px 0px 0px;
    background: none;
    color: rgba(0, 0, 0, 0.4);

    &:hover {
      .nt-color-link;
    }
  }

  .el-input-number__decrease {
    .el-icon-arrow-down {
      &::before {
        content: "\e60b";
      }
    }
  }
  .el-input-number__increase {
    .el-icon-arrow-up {
      &::before {
        content: "\e60c";
      }
    }
  }
}


// 鼠标hover、 输入状态
.is-focus .el-input__inner:not([disabled="disabled"]),
.el-input__inner:not([disabled="disabled"]):focus {
  box-shadow: 0 0 2px 0.5px @link!important;
}
.el-input__inner:not([disabled="disabled"]) {
  transition: 0.3s all;
  &:hover {
    border: 1px solid @link!important;
  }
}



.el-form-item.is-required:not(.is-no-asterisk) > .el-form-item__label:before {
  margin-right: 1px;
}

.el-form-item__label {
  padding-right: 4px;
}
.el-input__inner {
  height: 32px;
  line-height: 32px;
}

// 面包屑
.el-breadcrumb__inner {
  font-weight: inherit!important;
  color: inherit!important;
}


.el-input__inner {
  .nt-text-14;
  // padding: 0 12px!important;
  padding-left: 12px!important;
}


// 单选框
.el-radio {
  .el-radio__input {
    height: 16px;
  }
  .el-radio__inner {
    width: 16px;
    height: 16px;
  }
  .el-radio__label {
    .nt-text-14;
    display: inline;
    vertical-align: middle;
    // margin-bottom: 1px;
  }
  &.is-checked {
    .el-radio__inner {
      background: #fff;
      border-color: @link;
      &::after {
        width: 8px;
        height: 8px;
        background-color: @link;
      }
    }
    .el-radio__label {
      color: @link;
    }
  }
}
.el-radio {
  margin: 0;
}
.el-radio + .el-radio {
  margin-left: 16px;
  margin-right: 0;
}



// 复选框
.el-checkbox {
  .el-checkbox__input {
    &.is-focus .el-checkbox__inner {
      border-color: @link;
    }
    &.is-checked {
      .el-checkbox__inner {
        background: @link;
        border-color: @link;
        &::after {
          transform: rotate(45deg) scaleY(1) translate(1px);
        }
      }
    }
    .el-checkbox__inner {
      width: 16px;
      height: 16px;
    }
  }
  .el-checkbox__label {
    .nt-text-14;
    vertical-align: middle;
  }
  &.is-checked {
    .el-checkbox__label {
      color: @link;
    }
  }
}
.el-checkbox {
  margin: 0;
}
.el-checkbox + .el-checkbox {
  margin-left: 16px;
  margin-right: 0;
}

//
.el-picker-panel {
  .el-date-range-picker__content.is-left {
    border: none;
    .el-date-table {
      padding-left: 16px;
      padding-bottom: 16px;

      padding-right: 8px;
    }
  }
  .el-date-range-picker__content.is-right {
    .el-date-table {
      padding-right: 16px;
      padding-bottom: 16px;

      padding-left: 8px;
    }
  }


  .el-date-range-picker__header {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom:1px solid rgba(0, 0, 0, 0.09);

    .el-picker-panel__icon-btn {
      float: none;
      // align-self: flex-start;
      margin: 0;
    }
    .el-icon-d-arrow-left,
    .el-icon-arrow-left,
    .el-icon-d-arrow-right,
    .el-icon-arrow-right {
      position: absolute;
      color: rgba(0, 0, 0, .3) !important;
    }
    .el-icon-d-arrow-left {
      left: 16px;
    }
    .el-icon-arrow-left {
      left: 32px;
    }
    .el-icon-d-arrow-right {
      right: 16px;
    }
    .el-icon-arrow-right {
      right: 32px;
    }
  }

  .el-picker-panel__content {
    padding: 0;
  }


  .el-date-table {
    tr th {
      border-bottom: none;
      .nt-title-14;
    }
  }
  td {
    // width: 24px;
    // height: 24px;
    padding: 3px 0;

    > div {
      // width: 24px;
      height: 24px;
      padding: 0;

      > span {
        //
        background: none;
      }
    }
  }
  td.in-range {
    > div,
    > div:hover {
      background: rgba(18, 168, 88, 0.15);
    }
  }
  td.start-date > div,
  td.end-date > div,
   td.current > div {
    // border-radius: 2px;
    > span {
      // border-radius: 2px;
      background: @link!important;
      color: #fff;
    }
  }

  td.start-date > div {
    margin-left: 10px;
  }
  td.end-date > div {
    margin-right: 10px;
  }
}

//
.el-popper {
  margin-top: 0!important;
  .el-cascader-panel {
    min-width: 0;
  }

  .el-cascader-menu {
    flex: 1;
    min-width: 0;
    padding: 0;
  }
  .el-cascader-menu:last-child .el-cascader-node {
    padding-right: 30px;
  }
  .el-cascader-menu__list,
  .el-select-dropdown__list {
    padding: 4px 0;
  }

  .el-cascader-node,
  .el-select-dropdown__item {

    &.el-select-dropdown__item:not(.selected) {
      background: none;
    }

    padding-left: 12px;
    .nt-text-14;
    &:hover {
      background: rgba(18, 168, 88, 0.06)!important;
    }
    &.in-active-path,
    &.is-active,
    &.selected {
      .nt-text-link;
      background: rgba(18, 168, 88, 0.06)!important;
      // color: @link;
    }
    .el-icon-check {
      display: none;
    }
    .el-cascader-node__label {
      padding: 0;
    }
    .el-icon-arrow-right {
      color: #83868F;
    }
  }
}

.el-dialog__headerbtn {
  &:hover {
    i {
      color: rgba(0, 0, 0, 0.4)!important;
    }
    opacity: 0.7;
  }
}

.el-message {
  min-width: 140px;
  text-align: center;
}

.el-message-box {
  width: auto;
  padding: 0;

  .el-message-box__headerbtn {
    right: 21px;
  }
  .el-message-box__content {
    padding: 24px 24px;
  }
  .el-message-box__btns {
    padding: 24px;
    padding-top: 0;
  }
}
.el-message-box .iconjinggao {
  top: auto;
  transform: none;
  color: #e78e00;
}


.el-popper,
.el-popover {
  .popper__arrow {
    display: none;
  }
}
// 气泡确认框
.el-popover {
  padding: 32px 24px 16px;

  .el-popconfirm__action {
    margin-top: 24px;
    text-align: right;

    button {
      width: 65px;
      height: 32px;
    }
  }
  .el-popconfirm__main {
    .nt-title-16;
  }

  .el-popconfirm__icon {
    margin-right: 4px;
    font-size: 16px;
  }
}


.el-table {
  .el-table__body-wrapper {
    height: 100%;
  }
  .el-table__fixed-right {
    &::before {
      height: 0;
    }
  }
  .el-table__fixed-right {
    background: #fff;
  }
  th div.cell {
    .nt-text-14;
    .nt-color-title;
  }
  td div.cell {
    .nt-text-14;
    .nt-color-default;
  }
  div th:nth-child(1) .cell {
    padding-left: 16px!important;
  }
  div tr td:nth-child(1) .cell {
    padding-left: 16px!important;
  }
  &::before {
    height: 0;
  }

  .el-tabs__content {
    height: 100%;
  }
  .el-table__row {
    .nt-text-14;
  }
  th {
    .nt-title-14;
      border-bottom: none;
      background: rgba(0, 0, 0, 0.04);
  }
  td {
    padding: 8px 0;
  }
  &:not(.el-table--border) td {
    border-bottom: none;
  }

  // 斑马线深色tr
  tr.el-table__row--striped {
    td {
      background: rgba(0, 0, 0, .02)!important;
    }
    &:hover td {
      background-color: #ecf9f2!important;
    }
  }

  .el-table__body {
    td:not(.no-link) {
      cursor: pointer;
    }
  }

  .el-table__header-wrapper {
    flex-shrink: 0;
    flex-grow: 0;
  }

  &.scroll-y-auto-scrollview .el-table__body-wrapper {
    overflow-y: auto;
  }
}




.el-form-item.el-form-item {
  // margin-bottom: 32px;

  .el-form-item__error {
    margin-top: -2px;
    color: #F77E66;
  }
}




.el-message-box__btns {
  .el-button--default.el-button--primary {
    &:focus {
      background: @link;
      color: #fff;
    }
    &:hover {
      background: #3FB795;
      color: #fff;
    }
  }
}



// date-picker icon放到右侧
.el-date-editor {
  .iconyouzhi {
    transform: scaleX(0.8) scaleY(0.6);
    color: rgba(0, 0, 0, 0.3);
  }
  .el-input__inner {
    padding-left: 12px;
    .nt-text-14;
  }
  .el-input__prefix {
    left: auto;
    right: 12px;
  }
  .el-range__icon {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    margin-top: 1px;
  }
  .el-input__suffix {
    display: none;
  }

  .el-range-input {
    .nt-text-14;
  }
}


.el-button:not(.el-button--text) {
  padding: 8px 16px;
  .nt-fs-14;
  .font-regu;
}

.__disabled {
  border: 1px solid rgba(0, 0, 0, 0.15)!important;
  box-shadow: none!important;
  background: rgba(0, 0, 0, 0.08)!important;
  color: rgba(0, 0, 0, .2)!important;
}


.el-button--primary {
  background: @link;
  border-color: @link;

  &:hover {
    background: #3FB795;
  }
  &:active {
    background: #27A884!important;
  }
  &:focus {
    background: #3FB795;
    border-color: #3FB795;
  }

  &.is-disabled {
    .__disabled;
  }
}

.el-button--default {
  &:hover {
    border-color: @link;
    color: @link;
    background: none;
  }
  &:active {
    box-shadow: 0 0 2px 0.5px @link;
  }
  &:focus {
    background: none;
    color: @link;
  }
  &.is-disabled {
    .__disabled;
  }
}
.el-button.nt-text-link {
  .font-regu;
  color: @link;
  &:hover {
    color: #27A884;
  }
  &:active {
    color: #27A884;
  }
  &.is-disabled {
    color: rgba(0, 0, 0, .2);
  }
}

.el-pagination {
  padding: 0;

  .el-pager .number,
  .more,
  .btn-prev,
  .btn-next {
    min-width: 32px!important;
    height: 32px;
    line-height: 32px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    background: #fff!important;
    font-weight: 400;
    // color: rgba(0, 0, 0, 0.65)!important;
  }

  .el-pager .number.active {
    border-color: @link;
    color: @link!important;
  }
  
  .el-pagination__sizes .el-select .el-input__inner {
    height: 32px;
    line-height: 32px;
  }

  .more {
    border: none;
  }
}
.el-pagination .el-select .el-input {
  margin: 0;
  margin-left: 5px;
}
.pagination-total {
  display: inline-block;
  .nt-text-14;
}

.el-dropdown-menu {
  .el-dropdown-menu__item {
    .nt-text-14;
    &:hover {
      color: @link;
    }
  }
}

// loading
.el-loading-mask {
  .el-loading-spinner {
    circle {
      stroke: @link;
    }
  }
  .el-loading-text {
    color: @link;
  }
}

.el-form-item.is-success .el-input__inner {
  border-color: @link;
}

/// 修改input默认边框色
.el-input__inner {
  border: 1px solid rgba(0, 0, 0, 0.1);
}
.el-input.is-disabled .el-input__inner {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.15);
  &:hover {
    border-color: rgba(0, 0, 0, 0.15)!important;
  }
}

// 隐藏table的滚动条
.el-table__body-wrapper::-webkit-scrollbar-thumb {
  background-color: transparent !important;
}
.el-table__body-wrapper:hover::-webkit-scrollbar-thumb {
  background-color: #c8cdda !important;
}

.progress-contain {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;

  .el-progress {
    width: 80px;
    flex: 1;
    margin-left: 4px;
  }

}
